import { BaseEntity } from '@cool-midway/core';
import { BeforeRemove, Column, Entity, Index } from 'typeorm';

/**
 *
 */
@Entity('demo_ships')
export class DemoShipsEntity extends BaseEntity {

  // @Column({ comment: '船的编号', default: 1 })
  // shipId: number;

  @Column({ comment: '是否存储数据', default: 0 })
  storeState: number;

  @Column({ comment: '账号id', default: 0 })
  userId: number;

  @Column({ comment: '船系列号', default: '' })
  sn: string;

  @Column({ comment: '船名', default: '' })
  shipName: string;

  @Column({ comment: '描述', default: '' })
  description: string;

  @Column({ comment: '是否在线', default: 0 })
  online: number;

  @Column({ comment: '最后一次活动开始时间', type: 'datetime', default: null, nullable: true })
  lastActivityStartTime: string;

  @Column({ comment: '最后一次活动结束时间', type: 'datetime', default: null, nullable: true })
  lastActivityEndTime: string;

  @Column({ comment: '最后一次活动结开始经度', default: '' })
  lastActivityStartLng: string;

  @Column({ comment: '最后一次活动结开始纬度', default: '' })
  lastActivityStartLat: string;

  @Column({ comment: '最后一次活动结结束经度', default: '' })
  lastActivityEndLng: string;

  @Column({ comment: '最后一次活动结结束纬度', default: '' })
  lastActivityEndLat: string;

}
